from django.urls import path
from rest_framework import routers
from rest_framework_simplejwt.views import TokenRefreshView, TokenVerifyView
from . import views

app_name = 'users'

router = routers.DefaultRouter()

router.register("user", views.UserViewSet)
router.register("specialization", views.SpecializationViewSet)
router.register("group", views.GroupViewSet)
router.register("specialization_type", views.SpecializationTypeViewSet)

urlpatterns = router.urls

urlpatterns += [
    path('token/', views.CustomTokenObtainPairView.as_view(), name='token_obtain_pair'),
    path('token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
    path('token/verify/', TokenVerifyView.as_view(), name='token_verify'),
]
